﻿// =================================================================== 
// 数据访问层接口层(GDIT.Pattern)
//====================================================================
// 文件：IDetailMenus.cs
// 项目名称：学院网站
// 创建时间：2012-08-08
// 负责人：ChenZhiGang
//引用DevExpress.Xpo程序集
// 程序集介绍：详细菜单（二级菜单）信息数据访问层接口
// ===================================================================
using GDIT.Model;
using DevExpress.Xpo;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace GDIT.Pattern
{
    public interface IDetailMenus
    {
        /// <summary>
        /// 新增二级菜单
        /// </summary>
        /// <param name="detailMenu">需要新增的二级菜单对象</param>
        /// <returns>1：新增成功 2：新增失败</returns>
        int InsertDetailMenus(Mtb_DetailMenus detailMenu);

        /// <summary>
        /// 删除二级菜单
        /// </summary>
        /// <param name="detailMenu">需要删除的二级菜单ID</param>
        /// <returns>1：删除成功 0：删除失败</returns>
        int DeleteDetailMenus(int id);

        /// <summary>
        /// 更新二级菜单
        /// </summary>
        /// <param name="detailMenu">需要更新的二级菜单对象</param>
        /// <returns>1：更新成功 0：更新失败</returns>
        int UpdateDetailMenus(Mtb_DetailMenus detailMenu);

        /// <summary>
        /// 查询所有的二级菜单列表
        /// </summary>
        /// <returns>所有的二级菜单列表</returns>
        IDataReader SelectDetailMenus();

        /// <summary>
        /// 查询单一的二级菜单对象
        /// </summary>
        /// <returns>单一的二级菜单对象</returns>
        Mtb_DetailMenus SelectDetailMenusByDetail(Mtb_DetailMenus detailMenu);
    }
}
